ScxV6Aggregate.Index Method

Controls which aggregate of a multiple-choice aggregate is enabled.

Remarks

This property is used view and control which type aggregate is currently selected. The aggregate can only be disabled using the value -1 if it is an optional aggregate.

Example:

The following example written in VB.NET shows the Index property being used to change the current connection aggregate of the secondary port of a modbus channel to TCP/IP. As this is an optional aggregate, the possible index values are -1 (None), 0 (Serial), 1 (TCP/IP)

Dim Svr As ScxV6DbClient.ScxV6Server

Dim Obj As ScxV6DbClient.ScxV6Object

Dim Aggr As ScxV6DbClient.ScxV6Aggregate

' Connect to the server

Svr = New ScxV6DbClient.ScxV6Server()

Svr.Connect("MAIN", "", "")

' Find a folder on the system

Obj = Svr.FindObject("Modbus Channel")

' Get the historic aggregate from the object

Aggr = Obj.Aggregate("ConnectionPoint2")

' Change the connection point to TCP/IP.

Aggr.Index = 1

' Disconnect

Svr.Disconnect()


Disclaimer

Geo SCADA Expert 2020